<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../static/bootstrap.css">
    <link rel="stylesheet" href="../static/bootstrap-theme.css">
    <script src="../static/jquery-3.2.1.min.js"></script>
    <script src="../static/bootstrap.js"></script>
    <title>Document</title>
</head>
<body>
<table>
    <tr>

    </tr>
    {% for c in contacts %}
        <tr>
            <td>{{ c.s_id.name }}</td>
            <td>{{ c.c_id.name }}</td>
            <td>{{ c.cheng }}</td>
            <td>{{ c.x_id.xueqi }}</td>
        </tr>
    {% endfor %}

</table>

<div class="pagination">
    <span class="step-links">
        {% if contacts.has_previous %}
            <a href="?page=1">&laquo; 第一页</a>
            <a href="?page={{ contacts.previous_page_number }}">上一页</a>
        {% endif %}

        <span class="current">
            页数 {{ contacts.number }} 到 {{ contacts.paginator.num_pages }}.
        </span>

        {% if contacts.has_next %}
            <a href="?page={{ contacts.next_page_number }}">下一页</a>
            <a href="?page={{ contacts.paginator.num_pages }}">最后一页 &raquo;</a>
        {% endif %}
    </span>
</div>


</body>
</html>